package com.atguigu.gmall.service.impl;

import com.atguigu.gmall.bean.UserAddress;
import com.atguigu.gmall.service.UserService;
import org.springframework.util.StringUtils;

import java.util.List;

/**
* @Author: WYF
* @Description: 存根
* @Create: 2020/6/14 1:59
* @Version: 1.0
*/
public class UserServiceStub implements UserService {

    private final UserService userService;

 
    /**
    * @Description: dubbo调用的
    * @Param: [userService]
    * @Return: 
    * @Author: WYF
    */
    public UserServiceStub(UserService userService) {
        this.userService = userService;
    }

    /**
     * @Description: 
     * @Param: [userId]
     * @Return: java.util.List<com.atguigu.gmall.bean.UserAddress>
     * @Author: WYF
     * @Date: 2020/6/14 1:59
    */
    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("本地存跟调用");
        if (!StringUtils.isEmpty(userId)) {
            return userService.getUserAddressList(userId);
        }
        return null;
    }
}
